<a href="<?php echo( base_url() ); ?>cmb/member_reports/download_members_report/<?php echo( $urlKey ); ?>/" target="_self">Download Data</a>
<?php
	Includes::IncludeFile( Includes::$FORM );
	Includes::IncludeFile( Includes::$SPACER );
	
	$curdatetime = time();
	
	$curdate = date('l, F jS, Y', $curdatetime);
	Form::OpenFormItemSummary('Date:', 50);
		echo( form_label($curdate, 'numrecs', 'style="width: 50px;" ') );
	Form::CloseFormItem();

	$curtime = date('h:i:s A', $curdatetime);
	Form::OpenFormItemSummary('Time:', 50);
		echo( form_label($curtime, 'numrecs', 'style="width: 50px;" ') );
	Form::CloseFormItem();
	
	Form::OpenFormItemSummary('Number of search results:', 260);
		echo( form_label(count($reginfo), 'numrecs', 'style="width: 20px;" ') );
	Form::CloseFormItem();
	echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
	
	Spacer::Render(0, 20);
		
?>
<table border="1">
	<?php
		if (count($reginfo) > 0)
		{
			$i = 0;
			echo('<th>First Name</th>');
			echo('<th>Last Name</th>');
			echo('<th>City</th>');
			echo('<th>State</th>');
			echo('<th>Zip</th>');
			echo('<th>Center</th>');
			
			foreach( $reginfo as $regrec)
			{
				if ($i % 2 != 0)
				{
					$rowColor = "#e0ffff";
				}
				else
				{
					$rowColor = "#ffffff";
				}
							
				echo('<tr bgcolor="'.$rowColor.'"> <td>'.$regrec['firstname'].'</td><td>'.$regrec['lastname'].'</td><td>'.$regrec['city'].'</td><td>'.$regrec['state'].'</td><td>'.$regrec['zip'].'</td><td>'.$regrec['center_name'].'</td></tr>');

				$i++;
			}
		}
		else
			echo "No results returned";
	?>
</table>
